During mount and unmount opertions we keep a reference to the
GtkPlacesView around, so we have a valid view for the callback
code, even in the case that othe external references have been
dropped (i.e. the containing window gets destroyed).
https://bugzilla.gnome.org/show_bug.cgi?id=764979
}
update_places (view);
+ g_object_unref (view);
}
static void
}
update_places (view);
+ g_object_unref (view);
}
static void
g_clear_error (&error);
}
+
+ g_object_unref (view);
}
static gboolean
priv->unmounting_mount = TRUE;
update_loading (view);
+ g_object_ref (view);
+
operation = gtk_mount_operation_new (GTK_WINDOW (toplevel));
g_mount_unmount_with_operation (mount,
0,
g_mount_operation_set_password_save (operation, G_PASSWORD_SAVE_FOR_SESSION);
+ /* make sure we keep the view around for as long as we are running */
+ g_object_ref (view);
+
g_file_mount_enclosing_volume (location,
0,
operation,
g_mount_operation_set_password_save (operation, G_PASSWORD_SAVE_FOR_SESSION);
+ /* make sure we keep the view around for as long as we are running */
+ g_object_ref (view);
+
g_volume_mount (volume,
0,
operation,